Cope if a VIF is not attached to a network.
authorEwan Mellor <ewan@xensource.com>
Thu, 28 Dec 2006 15:26:45 +0000 (15:26 +0000)
committerEwan Mellor <ewan@xensource.com>
Thu, 28 Dec 2006 15:26:45 +0000 (15:26 +0000)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendNetwork.py

index be0d5cedd56db74ce9182672cbec57da7e2498df..5e606957f18af30b3a000b7d6207204ac87f9f01 100644 (file)
@@ -90,7 +90,7 @@ class XendNetwork:
             vifs = vm.get_vifs()
             for vif in vifs:
                 vif_cfg = vm.get_dev_xenapi_config('vif', vif)
-                if vif_cfg['network'] == self.uuid:
+                if vif_cfg.get('network') == self.uuid:
                     result.append(vif)
         return result